package tests;

import static org.junit.Assert.*;
import geom.Point;
import geom.Rectangle;

import org.junit.Test;

public class RectangleTest {

	@Test
	public void testPointInShape() {
		Rectangle r = new Rectangle(new Point(-1.0, 4), 4, 5);
		assertTrue(r.pointInShape(new Point(-0.5, 1.5)));
		assertFalse(r.pointInShape(new Point(-20, 10)));
	}

	@Test
	public void testPointOnEdge() {
		Rectangle r = new Rectangle(new Point(-1.0, 4), 4, 5);
		assertTrue(r.pointOnEdge(new Point(2, -1)));
		assertFalse(r.pointOnEdge(new Point(1, 1)));
	}

}
